package com.hhss.qishi.DPtest.designpattern.factory.pizza;

import com.hhss.qishi.DPtest.designpattern.factory.ingredient.PizzaIngredientFactory;

public class MASStyleCheesePizza extends Pizza {

    private PizzaIngredientFactory pizzaIngredientFactory;

    public MASStyleCheesePizza(PizzaIngredientFactory pizzaIngredientFactory){
        this.pizzaIngredientFactory = pizzaIngredientFactory;
        name = "马鞍山芝士味披萨";
    }

    @Override
    public void prepare() {
        pizzaIngredientFactory.createDough();
        pizzaIngredientFactory.createSauce();
    }

    @Override
    public void bake(){
        System.out.println("baking by 马鞍山");
    }
}
